﻿Partial Public Class ucGeneralSettings

    Private uc As UserControl
    Private Sub ucGeneralSettings_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
        Dim selectedTab As String = RibbonMain.RightWindowContent
        Select Case selectedTab
            Case "AdminReaderSettings"
                MainTabControl.SelectedIndex = 1
            Case Else
                MainTabControl.SelectedIndex = 0
        End Select

    End Sub

    Private Sub tabAccountPolicies_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles tabAccountPolicies.Loaded
        If gridTabAccountPolicies.Children.Count = 0 Then
            uc = New ucAccountPolicies
            gridTabAccountPolicies.Children.Add(uc)
        End If
    End Sub

    Private Sub tabReaderSettings_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles tabReaderSettings.Loaded
        If gridTabReaderSettings.Children.Count = 0 Then
            uc = New ucReaderSettings
            gridTabReaderSettings.Children.Add(uc)
        End If
    End Sub
End Class
